package com.qf.commerce.mapper;

import com.qf.commerce.entity.Warehouse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Administrator
 */
public interface WarehouseMapper {
    /**
     * 单删 发货仓库
     * @param warehouseId
     * @return
     */

    int deleteWarehouse(@Param("warehouseId") Long warehouseId);
    /**
     * 不定删 发货仓库
     * @param warehouseIds
     * @return
     */
    int deleteWarehouses(@Param("warehouseIds") List<Long> warehouseIds);

    /**
     * 开启发货点
     * @param warehouseId
     * @return
     */
    int updateOpenDelivery(@Param("warehouseId") Long warehouseId);
    /**
     * 关闭发货点
     * @param warehouseId
     * @return
     */
    int updateCloseDelivery(@Param("warehouseId") Long warehouseId);
    /**
     * 开启收货点
     * @param warehouseId
     * @return
     */
    int updateOpenReceive(@Param("warehouseId") Long warehouseId);
    /**
     * 关闭收货点
     * @param warehouseId
     * @return
     */
    int updateCloseReceive(@Param("warehouseId") Long warehouseId);
    //添加发货仓
    int insertWarehouse(@Param("warehouse") Warehouse warehouse);
    //添加发货仓
    int updateWarehouse(@Param("warehouse") Warehouse warehouse);
    //查询发货仓
    List<Warehouse> selectWarehouseList();

    Warehouse selectWarehouseByName(String companyName);
}
